package io.renren.modules.lucky.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.app.form.out.AppGoodsInfoForm;
import io.renren.modules.app.form.out.AppGoodsInfoListForm;
import io.renren.modules.lucky.entity.AppGoodsInfoEntity;

import java.lang.reflect.InvocationTargetException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * app端-商品-详情信息
 *
 * @author chenshun
 * @email chenchen@ashacker.com
 * @date 2019-08-31 20:58:38
 */
public interface AppGoodsInfoService extends IService<AppGoodsInfoEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 移动端获取商品列表分页信息
     * @param curPage
     * @param pageSize
     * @param goodsFlag 0为删除
     * @param weekType 0为本周 1为下周 -1为以前
     * @return
     */
    List<AppGoodsInfoListForm> queryPageForApp(String curPage, String pageSize, String goodsFlag, String weekType, String userId)
            throws InvocationTargetException, IllegalAccessException;

    /**
     * 移动端获取我的商品列表信息
     * @param curPage
     * @param pageSize
     * @param goodsFlag 0为删除
     * @param userId
     * @return
     */
    List<AppGoodsInfoListForm> queryPageForMyGoods(String curPage, String pageSize, String goodsFlag, String userId)
            throws InvocationTargetException, IllegalAccessException;

    /**
     * 根据商品id 获取商品详情信息
     * @param goodId
     * @return
     */
    AppGoodsInfoForm getGoodsInfo(String goodId) throws InvocationTargetException, IllegalAccessException, ParseException;

    /**
     * 增加商品信息
     * @param infoEntity
     * @return
     */
    int addGoodsInfo(AppGoodsInfoEntity infoEntity);

    /** 
     * 浏览次数自增
     * @param id
     * @author HObOCat
     * @return
     */
    int addViewCount(Integer id);
}

